<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/register.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:52 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>微驾校 后台主题UI框架 - 注册</title>
    <meta name="keywords" content="微驾校后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="微驾校是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    {include file='public/header'/}
    <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen   animated fadeInDown">
        <div>
            
            <h3>修改密码</h3>
            <form class="m-t" role="form" action="###" method='POST'>
                <input type='hidden' name='id' value="{$student.id}"/>
                <div class="form-group">
                    <input type="text" class="form-control" disabled name="telphone" placeholder="手机号" value="{$student.telphone}" required="">
                </div>
                <div class="form-group">
                    <input type="text" class="form-control" name="old_password" placeholder="原密码" required="">
                </div>
                <div class="form-group">
                    <input type="password" class="form-control" name="password" placeholder="请输入新密码" required="">
                </div>
                <div class="form-group">
                    <input type="password" class="form-control" name="repassword" placeholder="请再次输入密码" required="">
                </div>
                <button type="submit" class="btn btn-primary block full-width m-b">保 存</button>
				

            </form>
        </div>
    </div>
    <script src="/static/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/static/js/plugins/iCheck/icheck.min.js"></script>
    <script src="/static/js/plugins/layer/layer.min.js"></script>
    <script>
        $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
        $(function(){
        	$(".m-t").submit(function(){
        		var password = $("input[name='password']").val();
        		var repassword = $("input[name='repassword']").val();
        		if(password!=repassword){
        			layer.alert("两次输入密码不一致！",function(i){
        				layer.close(i);
        			});
        			return false;
        		}
        		
        		var data = $(".m-t").serialize();
        		$.ajax({
        			url:"{:url('student/resetpwd')}",
        			data:data,
        			type:"POST",
        			success:function(msg){
        				console.log(msg);
        				layer.alert(msg,function(i){
        					layer.close(i);
        					if(msg=="密码修改成功！"){
        						location.href="{:url('student/index')}";
        					}
        					
        				});
        			},
        			error:function(err){
        				layer.alert("未知错误".err,function(i){
        					layer.close(i);
        				});
        			}
        		});
        		return false;
        	});
        });
    </script>
    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/register.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:52 GMT -->
</html>
